<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE BangPatterns, CPP, GeneralizedNewtypeDeriving, MagicHash,
  NoImplicitPrelude, UnboxedTuples #-}</span><span>
</span><span id="line-4"></span><span>
</span><span id="line-5"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Event.Unique</span><span>
</span><span id="line-6"></span><span>    </span><span class="hs-special">(</span><span>
</span><span id="line-7"></span><span>      </span><span class="annot"><a href="GHC.Event.Unique.html#UniqueSource"><span class="hs-identifier">UniqueSource</span></a></span><span>
</span><span id="line-8"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Unique.html#Unique"><span class="hs-identifier">Unique</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-9"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Unique.html#newSource"><span class="hs-identifier">newSource</span></a></span><span>
</span><span id="line-10"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Unique.html#newUnique"><span class="hs-identifier">newUnique</span></a></span><span>
</span><span id="line-11"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-12"></span><span>
</span><span id="line-13"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.html"><span class="hs-identifier">GHC.Num</span></a></span><span class="hs-special">(</span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier">Num</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Show.html"><span class="hs-identifier">GHC.Show</span></a></span><span class="hs-special">(</span><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier">Show</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-cpp">

#include &quot;MachDeps.h&quot;
</span><span>
</span><span id="line-19"></span><span class="hs-keyword">data</span><span> </span><span id="UniqueSource"><span class="annot"><a href="GHC.Event.Unique.html#UniqueSource"><span class="hs-identifier hs-var">UniqueSource</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="US"><span class="annot"><a href="GHC.Event.Unique.html#US"><span class="hs-identifier hs-var">US</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span class="hs-keyword">newtype</span><span> </span><span id="Unique"><span class="annot"><a href="GHC.Event.Unique.html#Unique"><span class="hs-identifier hs-var">Unique</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Unique"><span class="annot"><a href="GHC.Event.Unique.html#Unique"><span class="hs-identifier hs-var">Unique</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="asInt"><span class="annot"><span class="annottext">Unique -&gt; Int
</span><a href="GHC.Event.Unique.html#asInt"><span class="hs-identifier hs-var hs-var">asInt</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-22"></span><span>    </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span> </span><span id="local-6989586621679551644"><span id="local-6989586621679551649"><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Bool
(Unique -&gt; Unique -&gt; Bool)
-&gt; (Unique -&gt; Unique -&gt; Bool) -&gt; Eq Unique
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: Unique -&gt; Unique -&gt; Bool
$c/= :: Unique -&gt; Unique -&gt; Bool
== :: Unique -&gt; Unique -&gt; Bool
$c== :: Unique -&gt; Unique -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></a></span></span></span><span>  </span><span class="hs-comment">-- ^ @since 4.4.0.0</span><span>
</span><span id="line-23"></span><span>             </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551611"><span id="local-6989586621679551615"><span id="local-6989586621679551619"><span id="local-6989586621679551623"><span id="local-6989586621679551627"><span id="local-6989586621679551631"><span id="local-6989586621679551636"><span class="annot"><span class="annottext">Eq Unique
Eq Unique
-&gt; (Unique -&gt; Unique -&gt; Ordering)
-&gt; (Unique -&gt; Unique -&gt; Bool)
-&gt; (Unique -&gt; Unique -&gt; Bool)
-&gt; (Unique -&gt; Unique -&gt; Bool)
-&gt; (Unique -&gt; Unique -&gt; Bool)
-&gt; (Unique -&gt; Unique -&gt; Unique)
-&gt; (Unique -&gt; Unique -&gt; Unique)
-&gt; Ord Unique
Unique -&gt; Unique -&gt; Bool
Unique -&gt; Unique -&gt; Ordering
Unique -&gt; Unique -&gt; Unique
forall a.
Eq a
-&gt; (a -&gt; a -&gt; Ordering)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; Ord a
min :: Unique -&gt; Unique -&gt; Unique
$cmin :: Unique -&gt; Unique -&gt; Unique
max :: Unique -&gt; Unique -&gt; Unique
$cmax :: Unique -&gt; Unique -&gt; Unique
&gt;= :: Unique -&gt; Unique -&gt; Bool
$c&gt;= :: Unique -&gt; Unique -&gt; Bool
&gt; :: Unique -&gt; Unique -&gt; Bool
$c&gt; :: Unique -&gt; Unique -&gt; Bool
&lt;= :: Unique -&gt; Unique -&gt; Bool
$c&lt;= :: Unique -&gt; Unique -&gt; Bool
&lt; :: Unique -&gt; Unique -&gt; Bool
$c&lt; :: Unique -&gt; Unique -&gt; Bool
compare :: Unique -&gt; Unique -&gt; Ordering
$ccompare :: Unique -&gt; Unique -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Ord</span></a></span></span></span></span></span></span></span></span><span> </span><span class="hs-comment">-- ^ @since 4.4.0.0</span><span>
</span><span id="line-24"></span><span>             </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551580"><span id="local-6989586621679551584"><span id="local-6989586621679551588"><span id="local-6989586621679551592"><span id="local-6989586621679551596"><span id="local-6989586621679551600"><span id="local-6989586621679551605"><span class="annot"><span class="annottext">Integer -&gt; Unique
Unique -&gt; Unique
Unique -&gt; Unique -&gt; Unique
(Unique -&gt; Unique -&gt; Unique)
-&gt; (Unique -&gt; Unique -&gt; Unique)
-&gt; (Unique -&gt; Unique -&gt; Unique)
-&gt; (Unique -&gt; Unique)
-&gt; (Unique -&gt; Unique)
-&gt; (Unique -&gt; Unique)
-&gt; (Integer -&gt; Unique)
-&gt; Num Unique
forall a.
(a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a)
-&gt; (a -&gt; a)
-&gt; (a -&gt; a)
-&gt; (Integer -&gt; a)
-&gt; Num a
fromInteger :: Integer -&gt; Unique
$cfromInteger :: Integer -&gt; Unique
signum :: Unique -&gt; Unique
$csignum :: Unique -&gt; Unique
abs :: Unique -&gt; Unique
$cabs :: Unique -&gt; Unique
negate :: Unique -&gt; Unique
$cnegate :: Unique -&gt; Unique
* :: Unique -&gt; Unique -&gt; Unique
$c* :: Unique -&gt; Unique -&gt; Unique
- :: Unique -&gt; Unique -&gt; Unique
$c- :: Unique -&gt; Unique -&gt; Unique
+ :: Unique -&gt; Unique -&gt; Unique
$c+ :: Unique -&gt; Unique -&gt; Unique
</span><a href="GHC.Num.html#Num"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Num</span></a></span></span></span></span></span></span></span></span><span> </span><span class="hs-comment">-- ^ @since 4.4.0.0</span><span>
</span><span id="line-25"></span><span>             </span><span class="hs-special">)</span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span class="hs-comment">-- | @since 4.3.1.0</span><span>
</span><span id="line-28"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679551571"><span id="local-6989586621679551574"><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="GHC.Event.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-29"></span><span>    </span><span id="local-6989586621679551567"><span class="annot"><span class="annottext">show :: Unique -&gt; String
</span><a href="GHC.Show.html#show"><span class="hs-identifier hs-var hs-var hs-var hs-var">show</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; String) -&gt; (Unique -&gt; Int) -&gt; Unique -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Int
</span><a href="GHC.Event.Unique.html#asInt"><span class="hs-identifier hs-var hs-var">asInt</span></a></span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="annot"><a href="GHC.Event.Unique.html#newSource"><span class="hs-identifier hs-type">newSource</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="GHC.Event.Unique.html#UniqueSource"><span class="hs-identifier hs-type">UniqueSource</span></a></span><span>
</span><span id="line-32"></span><span id="newSource"><span class="annot"><span class="annottext">newSource :: IO UniqueSource
</span><a href="GHC.Event.Unique.html#newSource"><span class="hs-identifier hs-var hs-var">newSource</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(State# RealWorld -&gt; (# State# RealWorld, UniqueSource #))
-&gt; IO UniqueSource
forall a. (State# RealWorld -&gt; (# State# RealWorld, a #)) -&gt; IO a
</span><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-var">IO</span></a></span><span> </span><span class="annot"><span class="annottext">((State# RealWorld -&gt; (# State# RealWorld, UniqueSource #))
 -&gt; IO UniqueSource)
-&gt; (State# RealWorld -&gt; (# State# RealWorld, UniqueSource #))
-&gt; IO UniqueSource
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679551564"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679551564"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-33"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int#
-&gt; State# RealWorld
-&gt; (# State# RealWorld, MutableByteArray# RealWorld #)
forall d. Int# -&gt; State# d -&gt; (# State# d, MutableByteArray# d #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#newByteArray%23"><span class="hs-identifier hs-var">newByteArray#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679551563"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679551564"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-34"></span><span>    </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679551562"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679551562"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551561"><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679551561"><span class="hs-identifier hs-var">mba</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679551562"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld -&gt; UniqueSource
</span><a href="GHC.Event.Unique.html#US"><span class="hs-identifier hs-var">US</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679551561"><span class="hs-identifier hs-var">mba</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-35"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-36"></span><span>    </span><span class="hs-glyph">!</span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-type">I#</span></a></span><span> </span><span id="local-6989586621679551563"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679551563"><span class="hs-identifier hs-var">size</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">SIZEOF_HSINT</span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span class="annot"><a href="GHC.Event.Unique.html#newUnique"><span class="hs-identifier hs-type">newUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.Unique.html#UniqueSource"><span class="hs-identifier hs-type">UniqueSource</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="GHC.Event.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-39"></span><span id="newUnique"><span class="annot"><span class="annottext">newUnique :: UniqueSource -&gt; IO Unique
</span><a href="GHC.Event.Unique.html#newUnique"><span class="hs-identifier hs-var hs-var">newUnique</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.Unique.html#US"><span class="hs-identifier hs-type">US</span></a></span><span> </span><span id="local-6989586621679551559"><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679551559"><span class="hs-identifier hs-var">mba</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(State# RealWorld -&gt; (# State# RealWorld, Unique #)) -&gt; IO Unique
forall a. (State# RealWorld -&gt; (# State# RealWorld, a #)) -&gt; IO a
</span><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-var">IO</span></a></span><span> </span><span class="annot"><span class="annottext">((State# RealWorld -&gt; (# State# RealWorld, Unique #)) -&gt; IO Unique)
-&gt; (State# RealWorld -&gt; (# State# RealWorld, Unique #))
-&gt; IO Unique
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679551558"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679551558"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-40"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld
-&gt; Int# -&gt; Int# -&gt; State# RealWorld -&gt; (# State# RealWorld, Int# #)
forall d.
MutableByteArray# d
-&gt; Int# -&gt; Int# -&gt; State# d -&gt; (# State# d, Int# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#fetchAddIntArray%23"><span class="hs-identifier hs-var">fetchAddIntArray#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# RealWorld
</span><a href="#local-6989586621679551559"><span class="hs-identifier hs-var">mba</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">Int#
</span><span class="hs-number">1#</span></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679551558"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-41"></span><span>    </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679551557"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679551557"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551556"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679551556"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679551557"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Unique
</span><a href="GHC.Event.Unique.html#Unique"><span class="hs-identifier hs-var">Unique</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679551556"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-42"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Event.Unique.html#newUnique"><span class="hs-pragma hs-type">newUnique</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-43"></span></pre></body></html>